package com.hue.gulimail.gulimailauth;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
 * @author 姚凤桥
 * @Date 2021/11/23 17:35
 * @Description:
 * @EnableRedisHttpSession核心原理：
 *  EnableRedisHttpSession导入了RedisHttpSessionConfiguration配置()
 *  RedisHttpSessionConfiguration又向容器中添加了RedisOperationsSessionRepository(session操作redis的类)
 *  RedisHttpSessionConfiguration继承了SpringHttpSessionConfiguration
 *  SpringHttpSessionConfiguration又向容器中添加了SessionRepositoryFilter
 *  SessionRepositoryFilter(session存储过滤器)又继承了OncePerRequestFilter，OncePerRequestFilter继承了Filter
 *  所以相当于RedisHttpSessionConfiguration向容器中添加了一个Filter
 *
 *
 */
@EnableDiscoveryClient
@EnableFeignClients
//开启Redis作为Session存储
@EnableRedisHttpSession
@SpringBootApplication
public class GulimailAuthApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulimailAuthApplication.class, args);
    }

}
